//
//  RouteDaysView.m
//  Traveling
//
//  Created by 尹桥印 on 15/6/22.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "RouteDaysView.h"

@interface RouteDaysView()
@property (weak, nonatomic) IBOutlet UILabel *dayLabel;
@end
@implementation RouteDaysView

+(instancetype)daysView{
    return [[[NSBundle mainBundle] loadNibNamed:@"RouteDaysView" owner:nil options:nil] lastObject];
}

- (IBAction)deleteBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(routeDaysViewDeleteWithDayNum:)]) {
        [self.delegate routeDaysViewDeleteWithDayNum:self.dayNum];
    }
}

- (IBAction)addBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(routeDaysViewAddItemWithDayNum:addBtn:)]) {
        [self.delegate routeDaysViewAddItemWithDayNum:self.dayNum addBtn:sender];
    }
}

-(void)setDayNum:(NSInteger)dayNum{
    _dayNum = dayNum;
    self.dayLabel.text = [NSString stringWithFormat:@"第%ld天",(long)self.dayNum];
    
}


@end
